package com.gulimall.product.vo;

import com.gulimall.product.entity.SkuImagesEntity;
import com.gulimall.product.entity.SkuInfoEntity;
import com.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

/**
 * @author kkk
 * @date 2022/7/29
 */
@Data
public class SkuItemVO {
    /**
     * sku的基本属性
     */
    private SkuInfoEntity skuInfo;
    /**
     * sku的图片信息
     */
    private List<SkuImagesEntity> images;
    /**
     * spu的介绍
     */
    private SpuInfoDescEntity spuInfoDesc;
    /**
     * spu对应的销售属性
     */
    private List<SkuItemSaleAttrVo> saleAttrVos;

    /**
     * spu的规格参数
     */
    private List<SpuItemAttrGroupVo> attrGroupVos;
    private SeckillSkuInfoVo seckillSkuInfoVo;

    @Data

    public static class SkuItemSaleAttrVo {
        private Long attrId;
        private List<AttrValueWithSkuId> attrValues;
        private String attrName;
    }

    @Data
    public static class SpuItemAttrGroupVo {
        private String groupName;
        private List<SpuItemAttr> itemAttrs;
    }

    @Data
    public static class SpuItemAttr {
        private String attrName;
        private String attrValue;
    }

    @Data
    public static class AttrValueWithSkuId {
        private String attrValue;
        private List<Long> skuIds;
    }
}
